package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbDdosMapper;
import com.ruoyi.system.domain.TbDdos;
import com.ruoyi.system.service.ITbDdosService;

/**
 * DDOS攻击表Service业务层处理
 * 
 * @author zhh
 * @date 2025-02-20
 */
@Service
public class TbDdosServiceImpl implements ITbDdosService 
{
    @Autowired
    private TbDdosMapper tbDdosMapper;

    /**
     * 查询DDOS攻击表
     * 
     * @param ddosId DDOS攻击表主键
     * @return DDOS攻击表
     */
    @Override
    public TbDdos selectTbDdosByDdosId(String ddosId)
    {
        return tbDdosMapper.selectTbDdosByDdosId(ddosId);
    }

    /**
     * 查询DDOS攻击表列表
     * 
     * @param tbDdos DDOS攻击表
     * @return DDOS攻击表
     */
    @Override
    public List<TbDdos> selectTbDdosList(TbDdos tbDdos)
    {
        return tbDdosMapper.selectTbDdosList(tbDdos);
    }

    /**
     * 新增DDOS攻击表
     * 
     * @param tbDdos DDOS攻击表
     * @return 结果
     */
    @Override
    public int insertTbDdos(TbDdos tbDdos)
    {
        tbDdos.setCreateTime(DateUtils.getNowDate());
        return tbDdosMapper.insertTbDdos(tbDdos);
    }

    /**
     * 修改DDOS攻击表
     * 
     * @param tbDdos DDOS攻击表
     * @return 结果
     */
    @Override
    public int updateTbDdos(TbDdos tbDdos)
    {
        return tbDdosMapper.updateTbDdos(tbDdos);
    }

    /**
     * 批量删除DDOS攻击表
     * 
     * @param ddosIds 需要删除的DDOS攻击表主键
     * @return 结果
     */
    @Override
    public int deleteTbDdosByDdosIds(String[] ddosIds)
    {
        return tbDdosMapper.deleteTbDdosByDdosIds(ddosIds);
    }

    /**
     * 删除DDOS攻击表信息
     * 
     * @param ddosId DDOS攻击表主键
     * @return 结果
     */
    @Override
    public int deleteTbDdosByDdosId(String ddosId)
    {
        return tbDdosMapper.deleteTbDdosByDdosId(ddosId);
    }
}
